import React, { Component } from "react";
import styles from "./AddApi.less";

class DataHub extends Component {
  render() {
    const { dataDetail = {} } = this.props;
    return (
      <div className={styles.root}>
        <div className={styles.basicInfo}>
          <div style={{ display: "flex", justifyContent: "space-between" }}>
            <span className={styles.title}>数据配置</span>
          </div>
          <div className={styles.line}>
            <div className={styles.onePiece}>
              endpoint：
              <span className={styles.content}>
                {dataDetail.datahubEndpoint || `暂无`}
              </span>
            </div>
            <div className={styles.onePiece}>
              key_secret：
              <span className={styles.content}>
                {dataDetail.datahubAccessKeySecret || `暂无`}
              </span>
            </div>
          </div>
          <div className={styles.line}>
            <div className={styles.onePiece}>
              key_id：
              <span className={styles.content}>
                {dataDetail.datahubAccessKeyId || `暂无`}
              </span>
            </div>
            <div className={styles.onePiece}>
              project_name：
              <span className={styles.content}>
                {dataDetail.datahubProjectName || `暂无`}
              </span>
            </div>
          </div>
          <div className={styles.line}>
            <div className={styles.onePiece}>
              topic_name：
              <span className={styles.content}>
                {dataDetail.datahubTopicName || `暂无`}
              </span>
            </div>
            <div className={styles.onePiece}>
              subId：
              <span className={styles.content}>
                {dataDetail.datahubSubId || `暂无`}
              </span>
            </div>
          </div>
        </div>
      </div>
    );
  }
}

export default DataHub;
